package org.dtrevien.metamodel.java;

import org.dtrevien.metamodel.java.visitor.Visitor;

public abstract class Attribut {

	protected String name;
	protected Classe type;
	protected Relationship relationship;
	protected String card0, card1;
	protected Visibility visibility;
	
	public Attribut(Classe type, String name, Relationship relationship, Visibility v) {
		this.name = name;
		this.type = type;
		this.relationship = relationship;
		this.card0 = this.card1 = "";
		this.visibility = v;
	}

	public String getName() {
		return this.name;
	}
	
	public Classe getType() {
		return this.type;
	}
	
	public abstract void accept(Visitor v);

	public void setName(String label) {
		this.name = label;
	}

	public Relationship getRelationship() {
		return this.relationship;
	}

	public void setRelationship(Relationship relationship) {
		this.relationship = relationship;
	}

	public String getCard0() {
		return this.card0;
	}

	public void setCard0(String card) {
		this.card0 = card;
	}
	
	public String getCard1() {
		return this.card1;
	}

	public void setCard1(String card) {
		this.card1 = card;
	}


	public Visibility getVisibility() {
		return this.visibility;
	}


	public void setVisibility(Visibility visibility) {
		this.visibility = visibility;
	}

}
